package com.unidt.www.module.system.dal.mysql.user;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.unidt.www.framework.mybatis.core.mapper.BaseMapperX;
import com.unidt.www.module.system.dal.dataobject.user.SystemZzdUser;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Author sk
 * @Description:
 * @Date 2022/11/28 17:06
 **/
@Mapper
public interface SystemZzdUserMapper extends BaseMapperX<SystemZzdUser> {

    default  SystemZzdUser  getByZzdId(String zzdId){
        LambdaQueryWrapper<SystemZzdUser> lambdaQueryWrapper =
                new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(SystemZzdUser::getZzdId,zzdId);
        return this.selectOne(lambdaQueryWrapper);
    }

    default SystemZzdUser getByUserId(Long userId){
        LambdaQueryWrapper<SystemZzdUser> lambdaQueryWrapper =
                new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(SystemZzdUser::getUserId,userId);
        return this.selectOne(lambdaQueryWrapper);

    };
}
